package alpaca.config;

import java.io.IOException;
import java.util.Map;

public interface IConfigurator {
	
	/**
	 * Saves data to a file with key-value pairs.
	 * The file gets created if it doesn't exists, 
	 * otherwise gets overwritten.
	 * @param data The key-value pairs to save.
	 * @param file The file to save to. 
	 * @throws IOException
	 */
	void save(Map<String,String> data, String file) throws IOException;
	
	/**
	 * Loads key-value pairs from a file. 
	 * Causing exception if the file is not found. 
	 * @param file The file to load from.
	 * @return the data in key-value pairs.
	 * @throws IOException
	 */
	Map<String,String> load(String file) throws IOException;
	
}
